package com.fieldchain.ex.fa100.ui.trade.fragment;
import com.fieldchain.ex.fa100.base.MyBaseFragment;

/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/25
 */
public abstract class BaseTradFragment extends MyBaseFragment {
    public String market = "";
    public String company = "";
    public String coin = "";

    @Override
    protected void findView() {

    }

    @Override
    protected void setValue() {

    }

    @Override
    public void onResume() {
        super.onResume();
        if(getArguments()==null)return;
        String mk=getArguments().getString("market");
        if(mk!=null){
            setMarket(mk);
        }
        setArguments(null);
    }

    @Override
    public void after() {
        super.after();
    }

    @Override
    public int getLayout() {
        return 0;
    }

    public void setMarket(String market) {
        if(mContext==null) return;
        if(market==null)return;
        if(market.length()==0)return;
        if (mContext != null) {
            market=market.toUpperCase();
            this.market = market;
            String[] tags = market.split("_");
            coin = tags[1];
            company = tags[0];
            if (coin.length() > 0) {
                setCompany();
            }
        }
    }

    public abstract void setCompany();
}
